package com.zl.tby.vo;

import com.zl.tby.core.base.util.ToolsUtil;
import com.zl.tby.model.TbyFaceRecord;
import lombok.Data;

/**
 * @author changpeng
 * @version 1.0
 * @since 2024/11/13 19:01
 */
@Data
public class TbyFaceRecordForm extends TbyFaceRecord {
    private String grabTimeFormat;

    public TbyFaceRecordForm(TbyFaceRecord entity, String token) {
        this.setId(entity.getId());
        this.setDevId(entity.getDevId());
        this.setDevName(entity.getDevName());
        this.setBigImg(entity.getBigImg() + "?token=" + token);
        this.setSmallImg(entity.getSmallImg() + "?token=" + token);
        this.setGrabTime(entity.getGrabTime());
        this.setGrabTimeFormat(ToolsUtil.dateUtil2String(entity.getGrabTime(), "yyyy/MM/dd HH:mm:ss"));
    }
}
